<?php /* Smarty version 2.6.18, created on 2009-11-19 00:17:49
         compiled from reportFMAORS.tpl */ ?>
<script type="text/javascript">	
	var calendar1 = new ekimo_calendar("dfrom_show","date_from","Date From", "calendar");
	var calendar2 = new ekimo_calendar("dto_show","date_to","Date to", "calendar1");
</script>
<div id="main_content">
<div>
	<h1>FMA ORS Summmary</h1>
</div>
<table class="blue" width="100%">
	<tr valign="top" width="100%">
		<td width="99%" align="left">
			<div id="search" >
				<form name="searchForm" id="searchForm" method="POST">
					<h3><b>Searching<b></h3>
					<table width="100%" border="0">
						<tr>
							<td width="15%"><label>Country:</label></td>
							<td>
								<div id="country">
								<select id="country" name="country" onchange="doajaxAction('/admin/dataOMProvince/country/'+document.searchForm.country.value,0,'province');">
									<option value=""> --- </option>
									<?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['country']):
?>
									<option value="<?php echo $this->_tpl_vars['country']['country_code']; ?>
"><?php echo $this->_tpl_vars['country']['country']; ?>
</option>
									<?php endforeach; endif; unset($_from); ?>
								</select>
								</div>
							</td>
						</tr>
						<tr>
							<td><label>Province:</label></td>
							<td>
								<div id="province">
								<select name="province">
									<option value=""> --- </option>
								</select>
								</div>
							</td>
						</tr>
						<tr>
							<td><label>FMA:</label></td>
							<td>
								<div id="fma">
								<select name="fma">
									<option value=""> --- </option>
								</select>
								</div>
							</td>
						</tr>
						<tr>
							<td><label>Date From:</label></td>
							<td>
								<label for="date_from" class="yui-skin-sam">
									<input type="text" id="date_from" name="date_from">
									<a href="javascript:void(0);" id="dfrom_show">
										<img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/>
									</a>
									<div id="calendar" style="display:none;position:absolute;"></div> 
								</label>
							</td>
						</tr>
						<tr>
							<td><label>Date To:</label></td>
							<td>
								<label for="date_to" class="yui-skin-sam">
									<input type="text" id="date_to" name="date_to" >
									<a href="javascript:void(0);" id="dto_show">
										<img alt="Calendar" src="/app/default/www/images/calendar.jpg" border="0"/>
									</a>
									<div id="calendar1" style="display:none;position:absolute;"></div> 
								</label>
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<input type="button" value="Generate Report" onclick="search();">
							</td>
						</tr>
					</table>
				</form>
			</div>
			<br><br>
		</td>
		<td>
			<a onclick="toggle_div('search');" href="javascript:void(0);">
				<img id="show_arrow" border="0" src="/app/default/www/images/arrow-down.png" alt="Show Search"/>
			</a>
		</td>
	</tr>
	</table>
<br><br>
<form method="POST" action="">
<div id="data_table">

</div>
<br><hr>
<input type="button" value="Save to Excel" >
<input type="button" value="Print" onclick="export_excel();">
</form>
</div>

<?php echo '
<script language="javascript">
	function search(){
		var params=\'/fma/\'+document.searchForm.fma.value+
				   \'/dateFrom/\'+document.searchForm.date_from.value+
				   \'/dateTo/\'+document.searchForm.date_to.value;
				   
		doajaxAction(\'/admin/reportFMAORSSearch\'+params,0,\'data_table\');
	}
	
	function export_excel(){
		window.location="/admin/reportSExcel";
	}
</script>
'; ?>



	
	
	